#include "processPoll.hpp"

#include <iostream>
using namespace std;

int ShowBorad()
{
    int command = 0;
    cout << "********************************" << endl;
    cout << "*1.打印日志任务 2. 数据库处理任务*" << endl;
    cout << "*3.资源请求任务 0. 退出程序     *" << endl;
    cout << "********************************" << endl;
    cout << "请选择：";
    cin >> command;
    return command;
}

int main()
{
    ProcessPoll processPoll;
    processPoll.Init();
    while (true)
    {
        int command = ShowBorad();
        if (command == 0)
        {
            break;
        }
        processPoll.StartTask(command);
    }

    return 0;
}